package com.finalterm.common.constant;

/**
 * 常量类
 */
public class Constants {
    
    /**
     * JWT相关常量
     */
    public static final String JWT_HEADER = "Authorization";
    public static final String JWT_PREFIX = "Bearer ";
    
    /**
     * 用户相关常量
     */
    public static final String USER_ID_HEADER = "X-User-Id";
    public static final String USERNAME_HEADER = "X-Username";
    
    /**
     * 订单状态
     */
    public static final String ORDER_STATUS_PENDING = "PENDING";
    public static final String ORDER_STATUS_PAID = "PAID";
    public static final String ORDER_STATUS_CANCELLED = "CANCELLED";
    public static final String ORDER_STATUS_TIMEOUT = "TIMEOUT";
    
    /**
     * 支付状态
     */
    public static final String PAYMENT_STATUS_PENDING = "PENDING";
    public static final String PAYMENT_STATUS_SUCCESS = "SUCCESS";
    public static final String PAYMENT_STATUS_FAILED = "FAILED";
    public static final String PAYMENT_STATUS_TIMEOUT = "TIMEOUT";
    
    /**
     * 缓存相关
     */
    public static final String PRODUCT_CACHE_PREFIX = "product:";
    public static final String USER_CACHE_PREFIX = "user:";
    
    /**
     * 消息队列主题
     */
    public static final String ORDER_TIMEOUT_TOPIC = "order-timeout";
    public static final String PAYMENT_SUCCESS_TOPIC = "payment-success";
    public static final String STOCK_RECOVERY_TOPIC = "stock-recovery";
}
